import 'package:flutter_test/flutter_test.dart';
import 'package:gkb_gms_availability/gkb_gms_availability.dart';
import 'package:gkb_gms_availability/gkb_gms_availability_platform_interface.dart';
import 'package:gkb_gms_availability/gkb_gms_availability_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockGkbGmsAvailabilityPlatform 
    with MockPlatformInterfaceMixin
    implements GkbGmsAvailabilityPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<bool> get isGmsAvailable => Future.value(false);
}

void main() {
  final GkbGmsAvailabilityPlatform initialPlatform = GkbGmsAvailabilityPlatform.instance;

  test('$MethodChannelGkbGmsAvailability is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelGkbGmsAvailability>());
  });

  test('getPlatformVersion', () async {
    GkbGmsAvailability gkbGmsAvailabilityPlugin = GkbGmsAvailability();
    MockGkbGmsAvailabilityPlatform fakePlatform = MockGkbGmsAvailabilityPlatform();
    GkbGmsAvailabilityPlatform.instance = fakePlatform;
  
    expect(await gkbGmsAvailabilityPlugin.getPlatformVersion(), '42');
  });
}
